﻿using SqlSugar;
using System;

namespace SCM.Model.DBEntity
{
    /// <summary>
    /// 规则项表
    /// </summary>
    [SugarTable("T_RuleItem")]
    public class T_RuleItem 
    {
        /// <summary>
        /// 规则条目ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 规则ID
        /// </summary>
        public string RuleID { get; set; }

        /// <summary>
        /// CAS号
        /// </summary>
        public string CASNo { get; set; }

        /// <summary>
        /// EC号
        /// </summary>
        public string ECNo { get; set; }

        /// <summary>
        /// 中文名
        /// </summary>
        public string CName { get; set; }

        /// <summary>
        /// 英文名
        /// </summary>
        public string Ename { get; set; }

        /// <summary>
        /// 限值
        /// </summary>
        public decimal Value { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime? CreateTime { get; set; } = DateTime.Now;

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string CreateTimeStr { get { return CreateTime.HasValue ? CreateTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : string.Empty; } }

        /// <summary>
        /// 最后编辑时间
        /// </summary>
        public DateTime? ModifyTime { get; set; }

        /// <summary>
        /// 最后编辑时间
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ModifyTimeStr { get { return ModifyTime.HasValue ? ModifyTime.Value.ToString("yyyy-MM-dd HH:mm:ss") : string.Empty; } }
    }
}